﻿using System.Collections.Generic;
using ORM.Business.Feedbacks;
using ORM.Business.Models.Entities;

namespace ORM.Business.Interfaces
{
    public interface ISecurityRepository
    {
        Feedback<user> LoginByOpenId(user user);
        Feedback<user> Register(user user);
        Feedback<user> GetBasicUserInfo(string username);
        Feedback ResetPassword(string email, string newPassword);
        Feedback<user> RequestResetPassword(string email, string resetPasswordKey);
        Feedback<user> CheckResetPasswordKey(string resetPasswordKey);
        Feedback<user> SetResetPasswordKey(string resetPasswordKey);
        Feedback ChangePassword(string oldPassword, string newPassword, int userId);
        Feedback<IList<Permission>> GetAllPermissions();
        Feedback<IList<Role>> GetAllRoles();
        Feedback<Role> InsertRole(Role role, IList<int> permissionIds);
        Feedback DeleteRole(int roleId);
        Feedback<Role> GetRoleDetails(int roleId);
        Feedback<Role> UpdateRole(Role c, IList<int> permissionIds);
        Feedback Login(string username, string password);
    }
}